import { defineConfig } from '@vben/vite-config';

export default defineConfig(async () => {
  return {
    application: {},
    base: '/',
    vite: {
      server: {
        // proxy: {
        //   '/api': {
        //     changeOrigin: true,
        //     rewrite: (path) => path.replace(/^\/api/, ''),
        //     // mock代理目标地址
        //     target: 'http://localhost:5320/api',
        //     ws: true,
        //   },
        // },
      /*  headers: {
          'Cross-Origin-Opener-Policy': 'same-origin',
          'Cross-Origin-Embedder-Policy': 'require-corp',
        }, */
      },
      optimizeDeps: {
        exclude: ['@sqlite.org/sqlite-wasm'],
      },
    },
  };
});
